//
//  UIColor+GGAddtion.m
//  Gunterapple
//
//  Created by 热带雨林 on 2020/4/1.
//  Copyright © 2020 热带雨林. All rights reserved.
//

#import "UIColor+GGAddtion.h"

//#import <AppKit/AppKit.h>


@implementation UIColor (GGAddtion)
+ (instancetype)gg_colorWithHex:(int32_t)hex{
    //90  a2   c0
    int red = (hex & 0xFF0000) >> 16;
    int green = (hex & 0x00FF00) >> 8;
    int blue = hex & 0x0000FF;
    
    return [UIColor gg_colorWithR:red G:green B:blue alpha:1];
}

+ (instancetype)gg_colorWithR:(int)red G:(int)green B:(int)blue alpha:(CGFloat)alpha{
    return [UIColor colorWithRed:red/255.0 green:green/255.0 blue:blue/255.0 alpha:alpha];
}

@end
